import hashlib
m = hashlib.md5()
current_username=""

class User:
    def __init__(self, username, password, email, exam):
        self.username = username
        self.password = self.md5_password(password)
        self.email = email
        self.exam = exam

    def md5_password(self, password):
        m.update(password.encode("utf8"))
        return m.hexdigest()

    @staticmethod
    def verify_password(input_password,md5_password):
        m.update(input_password.encode("utf8"))
        return md5_password ==  m.hexdigest()



if __name__ == '__main__':
    m.update("123".encode("utf8"))
    print(m.hexdigest())